package com.paas.form.controller;

import com.paas.form.service.IFormPortalQueryService;
import com.paas.form.vo.FormMasterViewStatisticsVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/form/portalStatisticalQuery")
public class FormPortalController {

    @Autowired
    public IFormPortalQueryService formPortalQueryService;

    @GetMapping(value = "/queryDataChangeRecentData")
    @ApiOperation(value = "查询主数据7天维护统计",notes = "查询主数据7天维护统计")
    public List<HashMap<String, Object>> queryDataChangeRecentData(){
        return formPortalQueryService.queryDataChangeRecentData();
    }


    @GetMapping(value = "/queryMasterDataOverview")
    @ApiOperation(value = "查询主数概览",notes = "查询主数概览")
    public FormMasterViewStatisticsVo queryMasterDataNum(){
        return formPortalQueryService.queryMasterDataOverview();
    }

    @GetMapping(value = "/queryMasterDataStatisticsNum")
    @ApiOperation(value = "主数据数量统计",notes = "主数据数量统计")
    public FormMasterViewStatisticsVo queryMasterDataStatisticsNum(){
        return formPortalQueryService.queryMasterViewStatistics();
    }
}
